<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>

<html>
	<head>
		<title>金融风险管理系统</title>
		<link rel="shortcut icon" href="${contextPath}/images/favicon.ico" />
		<link href="styles/frame.css" rel="stylesheet" type="text/css" />
		<script src="scripts/jquery/jquery-1.8.3.min.js" type="text/javascript"></script>
		<script src="scripts/frame.js" type="text/javascript"></script>
		
		<script type="text/javascript">
			function JumpFrame(url1, url2){
			    jQuery('#menufra').get(0).src = url1;
			    jQuery('#main').get(0).src = url2;
			}
		
		</script>
		<style type="text/css">
#msg_win{
border:1px solid #CCFFFF;
background:#FFFFFF;
width:310px;
position:absolute;
right:0;
font-size:12px;
color:#000000;
font-family:Arial;
margin:0px;
display:none;
overflow:hidden;
z-index:105;}
#msg_win .icos{position:absolute;top:0px;right:2px;z-index:9;}
.icos a{float:left;color:#833B02;margin:1px;text-align:center;font-weight:bold;width:14px;height:22px;line-height:22px;padding:1px;text-decoration:none;font-family:webdings;}.icos a:hover{color:#fff;}#msg_title{background:#CCFFFF;height:25px;line-height:25px;text-indent:5px;}#msg_content{padding:0px 0px 0px 1px;width:310px;height:200px;overflow:hidden;}
*{padding:0; margin:0;}
#roll{ border:1px solid red;height:200px; margin:0px auto; width:350px; overflow:hidden;list-style:none;}
#roll li{height:30px; padding-left:10px;line-height:30px; border-bottom:1px solid #ddd;}
a{font-size:12px; text-decoration:none; font-family:'宋体';}

</style>
	</head>

<body class="showmenu">
<div class="head">
  <div class="xt_main_top">
    <div class="xt_main_top_top">
      <span><a href="#"><img src="images/xt_main_top_top_span.png" /></a></span>
      <ul>
        <li><a href="system/menu/left.do" target="menu">主菜单</a></li>
        <li><a href="#" onclick="JumpFrame('system/menu/left.do','indexBody.do');">系统主页</a></li>
        <li><a href="logout.do" target="_top" onclick="return confirm('是否注销?')">注销</a></li>
<!--         <li style="background:none;"><a href="#">快捷方式</a></li> -->
<!--         <div class="quick"> <a href="#" class="ac_qucikmenu" id="ac_qucikmenu">快捷方式</a> <a href="#" class="ac_qucikadd" id="ac_qucikadd"> -->
 
      </ul>
    </div>
     <div class="xt_main_top_bottom_wai">
     <div class="xt_main_left_nei_yccd"><div class="menuact"><a href="#" id="togglemenu">隐藏菜单</a>
     </div>
     </div>
     <div class="xt_main_top_bottom"><span><a href="#">在线帮助</a></span>您好：<s:property value="user.realName"/>,欢迎使用金融风险管理系统！&nbsp;<font color="red"><a href="toPassword.do" target="main" style="color: red;">修改密码</a></font>
     </div>
     </div>
  </div>
</div>

<div class="left">
  <div class="menu" id="menu" >
    <iframe src="system/menu/left.do" id="menufra" name="menu" frameborder="0" scrolling="no"></iframe>
  </div>
</div>
<div class="right">
<ul>
</ul>
  <div class="main">
    <iframe id="main" name="main" frameborder="0" src="mytask/index.do"></iframe>
  </div>
</div>

<script type="text/javascript">
document.write("<div id='msg_win' style='display:block;top:1000px;visibility:visible;opacity:1;'>");
document.write("<div class='icos'><a id='msg_min' title='最小化' href='javascript:void 0'>_</a><a id='msg_close' title='关闭' href='javascript:void 0'>×</a></div>");document.write("<div id='msg_title'>预警信息提示</div>");
document.write("<div id='msg_content'");
//document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='300' height='250'> ");
//document.write("<param name='movie' value='/img/ad.swf'>");
//document.write("<embed src='/img/ad.swf' width='300' height='250' type='application/x-shockwave-flash' />");
//document.write("</object>");
document.write("</div>");
document.write("</div>");
var Message={
		set:function(){
			var set=this.minbtn.status==1?[0,1,'block',this.char[0],'最小化']:[1,0,'none',this.char[1],'恢复'];
			this.minbtn.status=set[0];this.win.style.borderBottomWidth=set[1];
			this.content.style.display=set[2];
			this.minbtn.innerHTML=set[3];
			this.minbtn.title=set[4];this.win.style.top=this.getY().top;},close:function(){this.win.style.display='none';window.onscroll=null;},setOpacity: function(x){var v=x>=100?'':'Alpha(opacity='+x+')';
			this.win.style.visibility = x<=0?'hidden':'visible';
			this.win.style.filter=v;
			this.win.style.opacity=x/100;},show:function(){
				clearInterval(this.timer2);
				var me=this,fx=this.fx(0,100,0.1),t=0;
				this.timer2=setInterval(function(){t=fx();
				me.setOpacity(t[0]);if(t[1]==0){clearInterval(me.timer2);}},10);
				},
				fx:function(a,b,c){
					var cMath=Math[(a-b)>0?"floor":"ceil"],
					c=c||0.1;return function(){return[a+=cMath((b-a)*c),a-b];
					};
					},
					getY:function(){
						var d=document,b=document.body,e=document.documentElement;
						var s=Math.max(b.scrollTop,e.scrollTop);
						var h=/BackCompat/i.test(document.compatMode)?b.clientHeight:e.clientHeight;
						var h2=this.win.offsetHeight;return{foot:s+h+h2+'px',top:s+h-h2+'px'};
						},
						moveTo:function(y){
							clearInterval(this.timer);
							var me=this,a=parseInt(this.win.style.top)||0;
							var fx=this.fx(a,parseInt(y));
							var t=0;this.timer=setInterval(
									function(){t=fx();
							me.win.style.top=t[0]+'px';
							if(t[1]==0){clearInterval(me.timer);
							me.bind();}},10);
							},bind:function(){
								var me=this,st,rt;window.onscroll=function(){
									clearTimeout(st);clearTimeout(me.timer2);
									me.setOpacity(0);st=setTimeout(function(){me.win.style.top=me.getY().top;me.show();
									},600);
									};
									window.onresize=function(){clearTimeout(rt);
									rt=setTimeout(function(){me.win.style.top=me.getY().top},100);
									}},
									init:function(){function $(id){return document.getElementById(id);
									};
									this.win=$('msg_win');
									var set={minbtn:'msg_min',closebtn:'msg_close',title:'msg_title',content:'msg_content'};
									for(var Id in set){this[Id]=$(set[Id]);};
									var me=this;this.minbtn.onclick=function(){me.set();this.blur();
									};
									this.closebtn.onclick=function(){me.close();
										};
										this.char=(!!(document.all&&navigator.userAgent.indexOf('Opera')===-1))?['0','2','r']:['─','〓','×'];
										this.minbtn.innerHTML=this.char[0];this.closebtn.innerHTML=this.char[2];
										setTimeout(function(){me.win.style.display='block';
										/*me.win.style.top=me.getY().foot;*/me.win.style.top= me.getY().top;me.moveTo(me.getY().top);
										},0);
										return this;
										}};
										Message.init();
function doAjaxBrandTest(){
	document.getElementById('msg_content').style.display='block';
	document.getElementById('msg_win').style.display='block';
		$.ajax({
			  async:false,
			  type: 'POST',
			  url:"<s:property value='contextPath'/>/mytask/prew.do",
			  dataType: "json",
			  success: function(data) {
					  var myobj=eval(data);
					  var msg="";
					  if(myobj.length>0){
						  for(var i=0;i<myobj.length;i++){
							  var url="<s:property value='contextPath'/>/"+ myobj[i].urlAddress;
							  var a ="'";
							  if(myobj[i].bool){
								  msg+="<li><a  title='"+myobj[i].msg+"' href=javascript:JumpMainFrame(" +a+url+a +");><font color=#f70938>"+myobj[i].msg+"</font></a></li>";
							  }else{
								  msg+="<li><a title='"+myobj[i].msg+"' href=javascript:JumpMainFrame(" +a+url+a +");>"+myobj[i].msg+"</a></li>";
							  }
							  
							  }   
						  document.getElementById('msg_content').innerHTML="<nobr><ul id='roll'>"+msg+"</ul><nobr>";
					  }else{
						  document.getElementById('msg_content').innerHTML="<ul><li>你没有预警信息</li></ul>";
					  }
		}
			});
		(function(A){
			   function _ROLL(obj){
			      this.ele = document.getElementById(obj);
			   this.interval = false;
			   this.currentNode = 0;
			   this.passNode = 0;
			   this.speed = 100;
			   this.childs = _childs(this.ele);
			   this.childHeight = parseInt(_style(this.childs[0])['height']);
			       addEvent(this.ele,'mouseover',function(){
			                                   window._loveYR.pause();
			           });
			    addEvent(this.ele,'mouseout',function(){
			                                   window._loveYR.start(_loveYR.speed);
			           });
			   }
			   function _style(obj){
			     return obj.currentStyle || document.defaultView.getComputedStyle(obj,null);
			   }
			   function _childs(obj){
			   var childs = [];
			   for(var q=0;q<obj.childNodes.length;q++){
			   var _this = obj.childNodes[q];
			   if(_this.nodeType===1){
			   childs.push(_this);
			   }
			   }   
			   return childs;
			   }
			 function addEvent(elem,evt,func){
			    if(-[1,]){
			     elem.addEventListener(evt,func,false);   
			    }else{
			     elem.attachEvent('on'+evt,func);
			    };
			 }
			 function innerest(elem){
			      var c = elem;
			   while(c.childNodes.item(0).nodeType==1){
			       c = c.childNodes.item(0);
			   }
			   return c;
			 }
			   _ROLL.prototype = {
			      start:function(s){
			           var _this = this;
			     _this.speed = s || 100;
			        _this.interval = setInterval(function(){
			          _this.ele.scrollTop += 1;
			       _this.passNode++;
			       if(_this.passNode%_this.childHeight==0){
			          var o = _this.childs[_this.currentNode] || _this.childs[0];
			          _this.currentNode<(_this.childs.length-1)?_this.currentNode++:_this.currentNode=0;
			          _this.passNode = 0;
			          _this.ele.scrollTop = 0;
			          _this.ele.appendChild(o);
			       }
			        },_this.speed);
			   },
			   pause:function(){
			   var _this = this;
			      clearInterval(_this.interval);
			   }
			   };
			    A.marqueen = function(obj){A._loveYR = new _ROLL(obj); return A._loveYR;};
			})(window);
			marqueen('roll').start(20);//调节滚动速度
}
function JumpMainFrame(url2){
    jQuery('#main').get(0).src = url2;
}
function doLing(){
	document.getElementById('msg_content').style.display='none';
	document.getElementById('msg_win').style.display='none';
}
window.onload=function(){//加载 
	doLing();
	};
	
	setTimeout("doAjaxBrandTest()", 60000);
	setInterval("doAjaxBrandTest()", 600000);
</script>
	</body>

</html>